package org.ihelpuoo.orm.handler;

import java.util.List;

import org.ihelpuoo.orm.IIIException;
import org.ihelpuoo.orm.IIIManual;
import org.ihelpuoo.orm.ObjectRule;
import org.ihelpuoo.orm.filter.Filter;
import org.ihelpuoo.orm.filter.FieldFilter;
import org.ihelpuoo.util.Pager;

public abstract class ObjectProcessor
{
	protected IIIManual		manual;
	protected FieldHandlers	getFieldHandlers;
	protected FieldHandlers	setFieldHandlers;

	public ObjectProcessor(IIIManual manual)
	{
		this.manual = manual;
	}

	public IIIManual getManual()
	{
		return manual;
	}

	public abstract Object fetch(ObjectRule r, Object src, Object obj, FieldFilter actived,
			FieldFilter locked, String prefix) throws IIIException;

	public abstract List query(ObjectRule r, Object src, Class type, Filter filter,
			FieldFilter actived, FieldFilter locked, Pager pager, Object refer) throws IIIException;

	public abstract boolean delete(ObjectRule r, Object src, Object obj, FieldFilter ignore)
			throws IIIException;

	public abstract int delete(ObjectRule r, Object src, List list, int off, int len)
			throws IIIException;

	public abstract Object insert(ObjectRule r, Object src, Object obj, FieldFilter actived,
			FieldFilter locked) throws IIIException;

	public abstract Object update(ObjectRule r, Object src, Object obj, FieldFilter actived,
			FieldFilter locked) throws IIIException;

}
